<template>
  <div class="newsBox">
    <div class="tips" v-if="countInformation.total>0"></div>
    <svg-icon
      style="font-size: 20px"
      class-name="search-icon"
      icon-class="icon_xiaoxi"
      @click.stop="click"
    />
  </div>
</template>
<script>
import { countByType } from "@/api/index";
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import Fuse from "fuse.js";
import path from "path";

export default {
  name: "HeaderSearch",
  data() {
    return {
      countInformation:{}
    };
  },
  computed: {
    
  },
  watch: {
   
  },
  created() {
    this.countByType();
  },
  mounted() {
    
  },
  methods: {
    click() {
      this.$router.push({path:'/TodoCenter'});
    },
    countByType() {
      //代办任务未处理条数
      countByType().then((res) => {
        this.countInformation = res.result;
      });
    },
  },
};
</script>
<style scoped>
.newsBox {
  padding-right: 30px !important;
  position: relative;
}
.newsBox:hover{
    opacity: 0.8;
    cursor: pointer;
}
.tips {
  width: 9px;
  height: 9px;
  background: #ff4848;
  border-radius: 50%;
  position: absolute;
  top: 13px;
  left: 20px;
}
</style>